//
//  HMHomeViewController.swift
//  VVeibo21
//
//  Created by 李浩杰 on 16/10/22.
//  Copyright © 2016年 李浩杰. All rights reserved.
//

import UIKit

class HMHomeViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        setupUI()
    }
    // MARK: - 设置视图
    private func setupUI() {
    
    
        setupNav()
    }
    //设置导航条
    private func setupNav() {
        navigationItem.leftBarButtonItem = UIBarButtonItem(setHighlightedImgName: "navigationbar_pop", target: self, action: #selector(leftClick))
        navigationItem.rightBarButtonItem = UIBarButtonItem(setHighlightedImgName: "navigationbar_friendsearch", target: self, action: #selector(rightClick))
    }
    
    // MARK: - 监听事件
    //左侧按钮点击
    @objc private func leftClick(){
        print("左侧按钮点击")
    }
    //右侧按钮点击
    @objc private func rightClick(){
        print("右侧按钮点击")
        let tempVC = HMTempViewController()
        tempVC.hidesBottomBarWhenPushed = true
        navigationController?.pushViewController(tempVC, animated: true)
        
    }
}
